package com.xius.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
import com.github.xiaoymin.knife4j.annotations.DynamicParameters;
import com.xius.common.ApiController;
import com.xius.common.R;
import com.xius.service.HxUserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/*
*
 *
* @author makejava
* @since 2020-06-12 17:14:18
*/
@RestController
@RequestMapping("/test/hxUser")
public class HxUserController extends ApiController {
    
    /*
    *
     * 服务对象
    */
    @Resource
    private HxUserService hxUserService;
    @PostMapping("queryAll")
    public R queryAll(@RequestBody Map<String,Object> map) {
        return success(hxUserService.queryAll(map));
    }
    @PostMapping("queryAllJoin")
    public R queryAllJoin(@RequestBody Map<String,Object> map) {
        return success(hxUserService.queryAllJoin(map));
    }
    @PostMapping("/queryById")
    public R queryById(@RequestBody Map<String,Object> map) {
        return success(hxUserService.queryById(map));
    }
    @PostMapping("insert")
    public R insert(@RequestBody Map<String,Object> map) {
        return success(this.hxUserService.insert(map));
    }
    @PostMapping("inserts")
    public R inserts(@RequestBody List<Map<String,Object>> list) {
        return success(this.hxUserService.inserts(list));
    }
    @PostMapping("update")
    public R update(@RequestBody Map<String,Object> map) {
        return success(this.hxUserService.update(map));
    }
    @PostMapping("deleteByIds")
    public R deleteByIds(@RequestBody Map<String,Object> map) {
        return success(this.hxUserService.deleteByIds(map));
    }
    @PostMapping("deleteById")
    public R deleteById(@RequestBody Map<String,Object> map) {
        return success(this.hxUserService.deleteById(map));
    }
}
